# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Andre Klitzing <aklitzing () online () de>

pkgname=libytnef
pkgver=1.9.3+7+g24fe30e
pkgrel=1
pkgdesc="Yerase's TNEF Stream Reader library (decode winmail.dat)"
url="https://github.com/Yeraze/ytnef"
license=('GPL')
arch=('x86_64')
depends=('glibc')
makedepends=('perl' git)
optdepends=('perl: ytnefprocess.pl script')
_commit=24fe30e592a7a840b415dbbc16ba47c7a882bb38  # master
source=("git+https://github.com/Yeraze/ytnef/#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd ytnef
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd ytnef
  ./autogen.sh
  autoreconf -fi
  ./configure --prefix=/usr --disable-static
  make
}

package() {
  cd ytnef
  make DESTDIR="$pkgdir" install
}
